#!/bin/bash

Tag="ext-service.jar"
# 检查进程状态
pid=$(ps -ef | grep -v 'grep' | egrep $Tag| awk '{printf $2 " "}')
if [ "$pid" != "" ]; then
  echo -n "当前服务器进程 ( pid $pid)正在运行中。"
  echo
  echo -n $"正在关闭进程："
  pid=$(ps -ef | grep -v 'grep' | egrep $Tag| awk '{printf $2 " "}')
  if [ "$pid" != "" ]; then
    echo "kill boot process"
    # kill  "$pid"
    kill -9 "$pid"
  fi
else
   echo "服务已关闭！"
fi
